10 POKE 53280,1:POKE 53281,1:PRINT"": REM SET SCREEN & PRINT COLOR 20 POKE 788,52: REM DISABLE STOP KEY 30 POKE 2,87: REM 87 = "[215]" FIGURE. THIS MEMORY LOCATION READ BY MACH LANG PGM 40 M3=49826:M4=49866:M5=49846:M6=49873: REM MACHINE LANGUAGE LOCATIONS 50 P2=56320:NT=127:REM CONTROL PORT 2 100 PRINT"[147]"," THE GAME OF" 110 PRINT," [217][165] [217][180] [217][207][183][183] [217][207][183][183] 120 [153]," (null)FN (null)SGN (null)FN (null)FN 130 PRINT," [217][165] [217][180] [217][207] [217][207] 140 [153]," (null)(null)ANDAND (null)SGN (null)SGN (null)(null)ANDAND 150 PRINT:PRINT 160 PRINT" A SELF REPLICATING SYSTEM OF CELLULAR"SPC(17)"AUTOMATA 170 [153] 180 [153],"CMDBY FRANK VAN DEVENTER 190 PRINT:PRINT 200 PRINT" THE PROGRAM WILL PROGRESSIVELY 210 [153]" ALTER ANY PATTERN THAT YOU ESTABLISH 220 PRINT" FOR IT, BY FOLLOWING ITS OWN SPECIAL 230 [153]" EVOLUTIONARY RULES. THE EXAMPLE WHICH 240 PRINT" FOLLOWS WILL CONTINUE UNTIL YOU PRESS 250 [153]" THE F7 KEY (LOWER RIGHT CORNER). 260 PRINT:PRINT:PRINT" [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164] 270 [153]" PRESS F7 KEY TO CONTINUE 280 GOSUB4000 290 GETA$:IFA$<>"[136]"THEN290 300 PRINT"[147] 301 [153]," (null) 302 PRINT," [215] 303 [153]," (null) 304 PRINT," [215][215][215] 305 [153]:[153] 306 [153],,," (null) 307 PRINT,,," [215] 308 [153],,," (null)(null)(null) 309 GETA$:IFA$<>""THEN309 310 SYSM5 330 PRINT"[147] EVOLUTIONARY RULES ARE AS FOLLOWS: 340 [153]:[153] 350 [153]" (null)(null)(null) EACH CELL HAS THE 360 PRINT" [215] [146][215] POSSIBILITY OF 370 [153]" (null)(null)(null) 8 NEIGHBORS 380 PRINT:PRINT 390 PRINT" BEGINNING WITH ANY CONFIGURATION, A 400 [153]"CELL WILL CONTINUE LIVING IN THE NEXT 410 PRINT"GENERATION IF IT HAS 2 OR 3 NEIGHBORS. 420 [153]"WITH FEWER IT DIES OF LONLINESS. WITH 430 PRINT"MORE IT DIES OF OVERCROWDING. 440 [153] 450 [153]" THOUGH ALL CELLS ARE IDENTICAL, THREE 460 PRINT"ARE REQUIRED FOR REPRODUCTION. WHEN 470 [153]"EXACTLY THREE CELLS ARE ADJACENT TO AN 480 PRINT"EMPTY SPACE, NEOGENESIS OF A NEW CELL 490 [153]"OCCURS IN THAT SPACE DURING THE NEXT 500 PRINT"GENERATION. THEY LIKE IT. THEY LIKE IT. 510 [153]:[153]" TOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTO 520 PRINT" PRESS F7 KEY TO CONTINUE 525 [161]A$:[139]A$[179][177]""[167]525 530 [161]A$:[139]A$[179][177]"LET"[167]530 550 [153]"LOAD THE PROGRAM NORMALLY USES A CIRCLE 560 PRINT" FIGURE [[215]] BUT CAN BE CHANGED TO ANY 570 [153]" CHARACTER YOU WISH. ENTER ANY OTHER 580 PRINT" CHARACTER OR REVERSE CHARACTER BEFORE 590 [153]" YOU PRESS THE F7 KEY 600 PRINT:PRINT:PRINT:PRINT 610 PRINT," [207][183][208] 620 [153]," SGN(null)+ 630 PRINT," [204][175][186] 640 [153]:[153]:[153]:[153]:[153]:[153]:[153]:[153]:[153] 645 [153]" TOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTO 650 PRINT" PRESS F7 KEY TO CONTINUE 660 [153]"",,"CMD"; 680 Q$[178]"(null)" 690 [161]A$:[139]A$[179][177]""[167]690 700 [161]A$:[139]A$[178]""[167]700 710 [139]A$[178]"LET"[167]760 720 [139]A$[178]"LOAD"[176]A$[178]"SAVE"[176]A$[178]""[176][198](A$)[178]34 [167]700 730 [153]A$;:Q$[178]A$ 740 [153]"",,"CMD"; 750 [137]700 760 Q[178][194](1483):[143] SCREEN LOCATION OF CHARACTER 770 [151]2,Q:[153] 800 [153]"LOAD ENTER ANY PATTERN YOU WISH USING ANY 810 PRINT" CHARACTER OR A JOYSTICK IN PORT 2":PRINT 830 PRINT"^[146] KEY MOVES CURSOR UP ^ 840 [153]"TAB( 850 PRINT"=[146] KEY MOVES CURSOR LEFT _ 860 [153]"TOTO 870 PRINT"F1[146] READ RULES 880 [153]"TOTO 890 PRINT"F2[146] STOP PROGRAM 900 [153]"TOTO 910 PRINT"F3[146] BEGIN EVOLUTION WITH EDGE DROPOFF 915 [153]"TOTO 920 PRINT"F4[146] SAME AS F3 - SINGLE STEP" 930 PRINT"[164][164] 940 [153]"F5WAIT BEGIN EVOLUTION WITH EDGE WRAPAROUND 945 PRINT"[164][164] - (TOPOLOGICALLY A TORUS) 950 [153]"F6WAIT SAME AS F5 - SINGLE STEP" 960 [153]"TOTO 970 PRINT"F7[146] END EVOLUTION OR CLEAR SCREEN 980 [153]:[153]" TOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTO 990 PRINT" PRESS F7 KEY TO CLEAR SCREEN 1000 [151]650,128:[161]A$:[139]A$[178]""[175][194](P2)[178]NT[167]1000:[143] ALL KEYS REPEAT 1005 [129]K[178]0[164]1[169]0:T[178][194](209)[170]256[172][194](210)[170][194](211):S[178][194](T):[139]S[179][177]32[167][151]T,Q 1010 [139]S[178]32[167][153]" WAITCMD";:S[178]160 1015 [161]A$:[139]NT[177][194](P2)[167]JS[178][194](P2)[175]31:[141]2000 1020 [139]A$[178]""[167]S[178](S[170]128)[175]255:[151]T,S:[137]1015 1025 S[178]S[175]127:[151]T,S 1030 [139]A$[178]"="[167]A$[178]"CMD":[153]A$;:[130] 1035 [139]A$[178]"^"[167]A$[178]"ON":[153]A$;:[130] 1040 [139]A$[178]""[167][139][194](214)[178]24[167][130] 1045 [139]A$[178]"ON"[176]A$[178]""[176]A$[178]""[176]A$[178]"CMD"[167][153]A$;:[130] 1050 [139]A$[178]" "[167][153]A$"CMD";:[130] 1055 [139]A$[178]"LET"[167][153]"LOAD",,"";:[130] 1060 [139]A$[178]"INPUT"[167]330 1065 [139]A$[178]"DIM"[167][158]M3:[130] 1070 [139]A$[178]"RUN"[167][158]M4:[130] 1075 [139]A$[178]"READ"[167][158]M5:[130] 1080 [139]A$[178]"IF"[167][158]M6:[130] 1085 [139]A$[178]"GOTO"[167][153]"LOAD":[151]650,0:[151]788,49:[128]:[143] KILL REPEAT/RESTORE STOP KEY 1090 [139]A$[178]"SAVE"[176]A$[178]""[176][198](A$)[178]34[167][130] 1095 [153]Q$"CMD"; 1100 [130] 2000 [139]JS[178]30[167]A$[178]"ON":[142] 2010 [139]JS[178]23[167]A$[178]"":[142] 2020 [139]JS[178]29[167]A$[178]"":[142] 2030 [139]JS[178]27[167]A$[178]"CMD":[142] 2040 [139]JS[178]15[167]A$[178]Q$:[139]S[179][177]32[175]S[179][177]160[167]A$[178]" " 2050 [142] 4000 [139][194](49153)[179][177]7[176][194](49879)[179][177]96[167][129]Q[178]49152[164]49879:[135]A:[151]Q,A:[130] 4010 [142] 5000 [131]169,7,133,254,169,0,133,253,160,231,162,4,177,253,201,32,240,4,165,2 5010 [131]145,253,136,208,243,177,253,201,32,240,4,165,2,145,253,198,254,202,208 5020 [131]228,162,0,173,134,2,157,0,216,157,0,217,157,0,218,157,0,219,232,208 5030 [131]241,32,142,194,96,169,0,141,60,3,133,251,133,253,169,4,133,252,169,7 5040 [131]133,254,160,192,32,197,193,169,4,133,254,160,0,32,197,193,162,24,208 5050 [131]31,165,252,133,254,165,251,168,16,8,105,40,48,6,230,252,208,2,105,40 5060 [131]133,251,32,197,193,200,32,197,193,202,240,10,200,32,197,193,32,67,194 5070 [131]24,144,215,160,0,169,4,133,254,32,197,193,32,67,194,169,7,133,252,169 5090 [131]231,133,251,169,4,133,254,160,39,32,241,193,165,252,133,254,164,251 5100 [131]32,241,193,162,24,208,31,165,252,133,254,165,251,168,48,8,233,40,16 5110 [131]6,198,252,208,2,233,40,133,251,32,241,193,136,32,241,193,202,240,10 5120 [131]136,32,241,193,32,67,194,56,176,215,160,231,169,7,133,254,32,241,193 5130 [131]32,67,194,169,0,141,61,3,169,193,133,251,169,7,133,252,169,7,133,254 5140 [131]165,251,201,231,240,33,56,233,41,168,32,29,194,164,251,136,32,29,194 5150 [131]169,4,133,254,172,61,3,32,29,194,238,61,3,32,67,194,230,251,208,213 5160 [131]169,192,141,61,3,169,1,133,251,169,4,133,252,169,4,133,254,165,251,201 5170 [131]39,240,33,24,105,39,168,32,29,194,164,251,136,32,29,194,169,7,133,254 5190 [131]172,61,3,32,29,194,32,67,194,238,61,3,230,251,208,213,169,23,141,61 5200 [131]3,162,38,169,41,133,251,169,4,133,252,165,252,133,254,56,165,251,48 5210 [131]9,233,41,16,7,198,254,24,144,2,233,41,168,32,29,194,24,152,16,9,105 5220 [131]38,48,7,230,254,24,144,2,105,38,168,32,29,194,24,152,16,9,105,38,48 5230 [131]7,230,254,24,144,2,105,38,168,32,29,194,32,67,194,230,251,208,2,230 5240 [131]252,202,208,182,206,61,3,240,8,230,251,230,251,162,38,208,169,32,113 5250 [131]194,96,177,253,201,32,240,3,238,60,3,200,177,253,201,32,240,3,238,60 5260 [131]3,24,152,16,8,105,38,48,6,230,254,16,2,105,38,168,177,253,201,32,240 5270 [131]3,238,60,3,96,177,253,201,32,240,3,238,60,3,136,177,253,201,32,240,3 5290 [131]238,60,3,56,152,48,8,233,38,16,6,198,254,16,2,233,38,168,177,253,201 5300 [131]32,240,3,238,60,3,96,177,253,201,32,240,3,238,60,3,200,208,2,230,254 5310 [131]177,253,201,32,240,3,238,60,3,200,208,2,230,254,177,253,201,32,240,3 5320 [131]238,60,3,96,165,252,24,105,64,133,254,160,0,177,251,201,32,240,21,173 5330 [131]60,3,201,4,240,19,201,3,240,15,169,32,140,60,3,164,251,145,253,96,173 5340 [131]60,3,16,237,165,2,208,239,0,160,0,185,0,68,153,0,4,185,0,69,153,0,5 5350 [131]185,0,70,153,0,6,185,0,71,153,0,7,200,208,229,160,0,169,32,153,0,68 5360 [131]153,0,69,153,0,70,153,0,71,200,208,241,96,32,0,192,32,91,193,164,198 5370 [131]173,119,2,160,0,132,198,201,136,208,240,96,32,0,192,32,64,192,164,198 5390 [131]173,119,2,160,0,132,198,201,136,208,240,96,32,0,192,32,91,193,96,32 5400 [131]0,192,32,64,192,96 5500 GAME C[145]CEPT BY JOHN H[176][164]N C[145]WAY UNIVERSITY OF CAMBRIDGE 5510 DESCRIBED BY MARTIN GARDNER IN SCIENT[139]IC AMERICAN 1970 5520 DESIGNED BY FRANK VAN DEVENTER VERSIOM: 9[173]6[173]85